<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>

</body>
</html>
<script type="text/javascript">
	var arr = new Array(1,2,3);

	var arr1 = new Array();

	for(var i = 0;i < 5; i++) {
		arr1.push(i+1);
	}

	arr1.unshift(0);

	arr1.splice(0,0, 'a');

	arr1.splice(arr1.length,0,'z');

	console.log(arr1);

	var aa = [1,2,3,4,5];

	var bb = aa.slice(1,-1);

	console.log(bb);



	var sports = [
		'高尔夫',
		'NBA',
		'CBA',
		'英超',
		'中超',
		'斯诺克'
	]

	var basketball = sports.slice(1,3);
	console.log(basketball);

	var football = sports.slice(3,5);
	console.log(football);

	sports.splice(1,2,basketball);

	sports.splice(2,2,football);

	console.log(sports);

	var newSport = sports.join(',');
	console.log(newSport);

	var str = '高尔夫,NBA,CBA,英超,中超,斯诺克';
	var data = str.split(',');
	console.log(data);

	console.log()
</script>